package com.ithuangyl.project;

import android.app.Application;

import com.ithuangyl.aroute.ARouter;
import com.ithuangyl.common.config.ConfigKeys;
import com.ithuangyl.common.config.Latte;

import okhttp3.logging.HttpLoggingInterceptor;

public class App extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Latte.init(this)
                .withApiHost("https://www.xgsxzx.com/v2/")
                .withLoaderDelayed(1000)
                .withDebug(false)
                .withInterceptor(new HttpLoggingInterceptor().setLevel(Latte.getConfiguration(ConfigKeys.IS_DEBUG) ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.BODY))
                .configure();
        ARouter.create().init(this);
    }
}
